<?php

namespace app\member\controller;

use app\common\controller\Frontend;
use app\admin\model\Member as MemberModel;


class Member extends Frontend
{

    protected $noNeedLogin = '*';
    protected $noNeedRight = '*';
    protected $layout = 'default';

    public function index()
    {
    	if(empty(session('memberinfo'))){
    		$this->error("请去登录",'member/login/index');
    	}
    	$member = session('memberinfo');
    	//var_dump($member->id);
    	$memberinfo = MemberModel::where('id',$member->id)->find();
    	$this->assign("memberinfo",$memberinfo);
        return $this->view->fetch();
    }
	
}